package com.fanketly.funacg2.data.repo

import com.fanketly.funacg2.data.model.HistoryModel
import com.fanketly.funacg2.data.network.RetrofitNetwork
import javax.inject.Inject
import javax.inject.Singleton

@Singleton
class HistoryRepo @Inject constructor(
    private val retrofitNetwork: RetrofitNetwork,
) {
    suspend fun getAll(page: Int, pageSize: Int) = retrofitNetwork.getHistory(page, pageSize)

    suspend fun insert(historyModel: HistoryModel) = retrofitNetwork.addHistory(historyModel)

    suspend fun delete(id: Int) = retrofitNetwork.deleteHistory(id)
    suspend fun clear() = retrofitNetwork.clearHistory()


}